<template>
  <div id="addFill">
        <div class="jx-content part1">
             <el-form :inline="true" class="demo-form-inline clearfix" :model="form">
                <el-form-item label="年份 ：">
                  <el-input-number v-model="form.num8" controls-position="right"  @change="handleChange" :min="2010" :max="2019"></el-input-number>
                </el-form-item>
                <el-form-item label="班级 ：">
                    <el-select v-model="form.chooseClass" placeholder="请选择班级">
                        <el-option
                        v-for="item in form.optionsclass"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        ></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="状态 ：">
                    <el-select v-model="form.choosestatus" placeholder="请选择状态">
                        <el-option
                        v-for="item in form.optionstatus"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        ></el-option>
                    </el-select>
                 </el-form-item>
                 <el-form-item label="学生信息 :" prop="info">
                     <el-input type="text" v-model="form.info" style="width: 50%;" placeholder="请输入学生信息" auto-complete="off"></el-input>
                 </el-form-item>
                 <el-form-item >
                    <div class="button-style" @click="search">搜 索</div>
                </el-form-item>
                <el-form-item class="fr">
                    <a class="button-style">下 载</a>
                </el-form-item>
             </el-form>
            <div class="tips"> 注：此列表按照默认班级检索</div>
            <div class="table">
                <el-table  :data="tableData3"  style="width: 100%">
                    <el-table-column  type="index" label="序号" width="100"> 
                        <template slot-scope="scope"><span>{{scope.$index+(currentPage - 1) * pagesize + 1}}</span> </template>
                    </el-table-column>
                    <el-table-column  prop="name"  label="姓名" ></el-table-column>
                    <el-table-column  prop="address" label="学号"></el-table-column>
                    <el-table-column  prop="address" label="班级"></el-table-column>
                    <el-table-column  prop="address" label="年份"> </el-table-column>
                    <el-table-column   prop="num"  label="简答题"></el-table-column>
                    <el-table-column   prop="num"  label="判0断题"></el-table-column>
              </el-table>
                <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="currentPage"
                :page-size="pagesize"
                layout="total, prev, pager, next, jumper"
                :total="totalCount">
                </el-pagination>
            </div>
         </div>
     
        
    </div>
</template>

<script>
    export default {
        data () {
            return {
                 tableData3: [{
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄',
                    num:4
                    }],
                  currentPage: 1,
                  pagesize: 10,
                  totalCount: 1000,
                  form:{
                   num8: 2010,
                   chooseClass:'',
                   optionsclass:[{
                        value: '选项1',
                        label: '黄金糕1'
                        }, {
                        value: '选项2',
                        label: '双皮奶1'
                        }
                   ],
                   info:'',
                   choosestatus:'',
                   optionstatus:[
                       { value: '选项3',
                        label: '黄金糕'
                        }, {
                        value: '选项4',
                        label: '双皮奶'
                        }
                   ],
                }
            }
        },
        methods: {
            //计数
             handleChange(value) {
                console.log(value);
            },
            //搜索
            search(){
              
            },
            //分页
			handleSizeChange: function (size) {
				this.pagesize = size;
			},
			handleCurrentChange: function(currentPage) {
                this.currentPage = currentPage
                //this.init()
            },
        }
    }
</script>
<style scoped>

    .table>>>tr:hover>td {
        background-color: #ffff !important;
     }
    .el-select>>>.el-input__icon{
        line-height: 32px;
    }
    .el-input-number>>>.el-input__inner{
        height: 40px;
        padding-right: 35px;
        padding-left: 0;
    }
    .el-table__row  .el-input-number>>>.el-input__inner{
        border: none;
    }
    .el-table__row  .el-input-number>>>.el-input-number__decrease, .el-table__row  .el-input-number>>>.el-input-number__increase{
         height: 17px;
         width: 17px;
        border-radius: 50%;
        border: 1px solid #dcdfe6;
        top: 10px;
    }
    .el-table__row  .el-input-number>>>.el-input-number__decrease{
       left: 80px;
    }
    .el-table__row  .el-input-number>>>.el-input-number__increase{
       right: 90px;
    }
    .el-table__row   .el-input-number>>>[class*=" el-icon-"],.el-table__row  .el-input-number>>> [class^=el-icon-]{
        position: absolute;
        left: 2px;
        top: 2px;
    }
</style>
<style scoped>
   .el-input-number.is-controls-right>>>.el-input-number__increase{
        line-height: 16px;
    }
    .el-input-number{
        position: relative;
        display: inline-block;
        line-height: 38px;
        overflow: hidden;
        width: auto;
    }
    .el-input-number>>>.el-input-number__increase{
        top: 4px;
    }
    .el-input-number.is-controls-right>>>.el-input-number__decrease{
         bottom: 4px;
    }
    .el-input-number>>>.el-input .el-input__inner{
        width: 100px;
    }
   
    
</style>
<style lang="scss" scoped>
 @import "./../../../styles/layout/color_variables";
  #addFill {
    width: $width;
    margin: 20px auto;
    color: #727272;
    .part1{
        .el-form-item{
             margin-bottom:0px;
         }
        .tips{
            margin-left: 10px;
            color: #1277eb;
        } 
    }
    .table{
        margin: 20px 0;
    }
  }
</style>